package com.woniuxy.book;

import com.woniuxy.book.dao.RegistDao;
import com.woniuxy.book.service.impl.LoginImpl;
import com.woniuxy.book.service.impl.RegistImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author 罗蔚
 * @Date 2022/3/24 18:53
 * @Description TODO
 */
public class Test {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("book.xml");
        RegistImpl registimpl = applicationContext.getBean("registImpl", RegistImpl.class);
        registimpl.checkUsername();

        LoginImpl loginImpl = applicationContext.getBean("loginImpl", LoginImpl.class);
        loginImpl.login();

    }
}
